<template>
    <div class="my">
        <el-col :xs="24" :sm="24" :md="20" :lg="18" :xl="16">
            <el-menu
                :default-active="activeIndex"
                class="el-menu-demo"
                mode="horizontal"
                @select="handleSelect"
                :router="true"
                >
                    <el-menu-item index="/moneySummary">概览</el-menu-item>
                    <el-menu-item index="/moneyInput" route="">记一笔</el-menu-item>
                    <el-menu-item index="/moneyAccount">账户</el-menu-item>
            </el-menu>
        </el-col>
    </div>
</template>

<script lang="ts" setup>
    import { ref } from 'vue';

    const activeIndex = ref('1')
    const handleSelect = (key: string, keyPath: string[]) => {
        console.log(key, keyPath)
    }
</script>

<style lang="scss" scoped>
.my {
    width: 1008px;
    margin: 0 auto;
}

.my .el-menu--horizontal.el-menu {
    border: none;
}

.my .el-menu--horizontal {
    height: 76px;
}

</style>